package com.eastfair.projectcore.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 
 * </p>
 *
 * @author zjn
 * @since 2021-12-15
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("c_exhibition")
@ApiModel(value = "Exhibition", description = "")
@AllArgsConstructor
public class Exhibition extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * E展通ID
     */
    @ApiModelProperty(value = "E展通ID")
    @Size(max = 32, message = "E展通ID长度不能超过32")
    @TableField(value = "e_id", condition = LIKE)
    @Excel(name = "E展通ID")
    private String eId;

    /**
     * B展通ID
     */
    @ApiModelProperty(value = "B展通ID")
    @Size(max = 32, message = "B展通ID长度不能超过32")
    @TableField(value = "b_id", condition = LIKE)
    @Excel(name = "B展通ID")
    private String bId;

    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    @Size(max = 255, message = "展会名称长度不能超过255")
    @TableField(value = "name", condition = LIKE)
    @Excel(name = "展会名称")
    private String name;

    /**
     * 展会名称（中文）
     */
    @ApiModelProperty(value = "展会名称（中文）")
    @Size(max = 255, message = "展会名称（中文）长度不能超过255")
    @TableField(value = "en_name", condition = LIKE)
    @Excel(name = "展会名称（中文）")
    private String enName;

    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    @Size(max = 255, message = "地址长度不能超过255")
    @TableField(value = "address", condition = LIKE)
    @Excel(name = "地址")
    private String address;

    /**
     * 地址（中文）
     */
    @ApiModelProperty(value = "地址（中文）")
    @Size(max = 255, message = "地址（中文）长度不能超过255")
    @TableField(value = "en_address", condition = LIKE)
    @Excel(name = "地址（中文）")
    private String enAddress;

    /**
     * logo图片地址
     */
    @ApiModelProperty(value = "logo图片地址")
    @Size(max = 255, message = "logo图片地址长度不能超过255")
    @TableField(value = "logo_image", condition = LIKE)
    @Excel(name = "logo图片地址")
    private String logoImage;

    /**
     * 广告视频
     */
    @ApiModelProperty(value = "广告视频")
    @Size(max = 255, message = "广告视频长度不能超过255")
    @TableField(value = "adverts_video", condition = LIKE)
    @Excel(name = "广告视频")
    private String advertsVideo;

    /**
     * 广告视频图片
     */
    @ApiModelProperty(value = "广告视频图片")
    @Size(max = 255, message = "广告视频图片长度不能超过255")
    @TableField(value = "adverts_video_image", condition = LIKE)
    @Excel(name = "广告视频图片")
    private String advertsVideoImage;

    /**
     * 广告图片
     */
    @ApiModelProperty(value = "广告图片")
    @Size(max = 255, message = "广告图片长度不能超过255")
    @TableField(value = "adverts_image", condition = LIKE)
    @Excel(name = "广告图片")
    private String advertsImage;

    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间")
    @TableField(value = "start_time")
    @Excel(name = "开始时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间")
    @TableField(value = "end_time")
    @Excel(name = "结束时间", format = DEFAULT_DATE_TIME_FORMAT, width = 20)
    private LocalDateTime endTime;

    /**
     * 默认每个展商单场直播时长限制（分钟）
     */
    @ApiModelProperty(value = "默认每个展商单场直播时长限制（分钟）")
    @TableField(value = "live_length_single")
    @Excel(name = "默认每个展商单场直播时长限制（分钟）")
    private Integer liveLengthSingle;

    /**
     * 默认每个展商直播总时长限制（分钟）
     */
    @ApiModelProperty(value = "默认每个展商直播总时长限制（分钟）")
    @TableField(value = "live_length_total")
    @Excel(name = "默认每个展商直播总时长限制（分钟）")
    private Integer liveLengthTotal;

    /**
     * 是否生效(默认1：可用 0:不可用)
     */
    @ApiModelProperty(value = "是否生效(默认1：可用 0:不可用)")
    @TableField(value = "is_enabled")
    @Excel(name = "是否生效(默认1：可用 0:不可用)")
    private Integer isEnabled;

    /**
     * 是否删除(默认0：未删除 1:已删除)
     */
    @ApiModelProperty(value = "是否删除(默认0：未删除 1:已删除)")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除(默认0：未删除 1:已删除)")
    private Integer isDeleted;

    /**
     * 同步系统id
     */
    @ApiModelProperty(value = "同步系统id")
    @Size(max = 32, message = "同步系统id长度不能超过32")
    @TableField(value = "exh_id", condition = LIKE)
    @Excel(name = "同步系统id")
    private String exhId;

    /**
     * 从B展通拉取观众数据的同步id
     */
    @ApiModelProperty(value = "从B展通拉取观众数据的同步id")
    @Size(max = 32, message = "从B展通拉取观众数据的同步id长度不能超过32")
    @TableField(value = "convert_exhibition_id", condition = LIKE)
    @Excel(name = "从B展通拉取观众数据的同步id")
    private String convertExhibitionId;

    /**
     * 届
     */
    @ApiModelProperty(value = "届")
    @Size(max = 32, message = "届长度不能超过32")
    @TableField(value = "exhibition_session", condition = LIKE)
    @Excel(name = "届")
    private String exhibitionSession;


    @Builder
    public Exhibition(Long id, LocalDateTime createTime, Long createdBy, LocalDateTime updateTime, Long updatedBy, 
                    Long projectId, String eId, String bId, String name, String enName, 
                    String address, String enAddress, String logoImage, String advertsVideo, String advertsVideoImage, String advertsImage, 
                    LocalDateTime startTime, LocalDateTime endTime, Integer liveLengthSingle, Integer liveLengthTotal, Integer isEnabled, Integer isDeleted, 
                    String exhId, String convertExhibitionId, String exhibitionSession) {
        this.id = id;
        this.createTime = createTime;
        this.createdBy = createdBy;
        this.updateTime = updateTime;
        this.updatedBy = updatedBy;
        this.projectId = projectId;
        this.eId = eId;
        this.bId = bId;
        this.name = name;
        this.enName = enName;
        this.address = address;
        this.enAddress = enAddress;
        this.logoImage = logoImage;
        this.advertsVideo = advertsVideo;
        this.advertsVideoImage = advertsVideoImage;
        this.advertsImage = advertsImage;
        this.startTime = startTime;
        this.endTime = endTime;
        this.liveLengthSingle = liveLengthSingle;
        this.liveLengthTotal = liveLengthTotal;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.exhId = exhId;
        this.convertExhibitionId = convertExhibitionId;
        this.exhibitionSession = exhibitionSession;
    }

}
